﻿using com.guojin.core.io.message;
using System.Collections;
using System.Collections.Generic;
using com.guojin.core.io;
using UnityEngine;
using System;

namespace com.guojin.mj.net.message.login
{
    public class ClubMessageRet : Message
    {
        public static int TYPE = 7;
        public static int ID = 69;
        private int type;
        private List<OneClubInfo> clubs;

        public int Type
        {
            get
            {
                return type;
            }

            set
            {
                type = value;
            }
        }

        public List<OneClubInfo> Clubs
        {
            get
            {
                return clubs;
            }

            set
            {
                clubs = value;
            }
        }

        public void decode(core.io.Input _in)
        {
            type =_in.readInt();
            int len = _in.readInt();
            if (len > 0)
            {
                clubs = new List<OneClubInfo>();
                for (int i = 0; i < len; i++)
                {
                    OneClubInfo oneClubInfo = new OneClubInfo();
                    oneClubInfo.decode(_in);
                    clubs.Add(oneClubInfo);
                }
            }
            else
            {
                clubs = null;
            }
        }

        public void encode(Output _out)
        {

        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "";
        }
    
    }
}